<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $s_lang?>" />
<title>安装程序 - 大米外贸商城系统Mishop<?php echo $verMsg; ?></title>
<script src="https://www.damicms.com/Public/js/jquery.js" language="javascript" type="text/javascript"></script>
<script language="javascript" type="text/javascript">
<!--
    function $o(tid){
        return document.getElementById(tid);
    }
    function TestDb()
    {
	var dbhost = $o('dbhost').value;
    var dbuser = $o('dbuser').value;
    var dbpwd = $o('dbpwd').value;
	var dbport = $o('dbport').value;
	$o('dbpwdsta').innerHTML='<img src=\'images/ajax-loader.gif\'>';
	$.get('index.php?step=10&dbhost='+dbhost+'&dbport='+ dbport +'&dbuser='+dbuser+'&dbpwd='+dbpwd,function(data,status){
    $o('dbpwdsta').innerHTML = data;
    });
    }
	
	function HaveDB()
    {
		var dbhost = $o('dbhost').value;
        var dbname = $o('dbname').value;
        var dbuser = $o('dbuser').value;
        var dbpwd = $o('dbpwd').value;
		var dbport = $o('dbport').value;
	$o('havedbsta').innerHTML='<img src=\'images/ajax-loader.gif\'>';
	$.get('index.php?step=10&dbhost='+dbhost+'&dbport='+ dbport +'&dbuser='+dbuser+'&dbpwd='+dbpwd+'&dbname='+dbname,function(data,status){
    $o('havedbsta').innerHTML = data;
    });
    }
    
	function GetRemoteDemo()
	{
		$o('_remotesta').innerHTML='<img src=\'images/ajax-loader.gif\'>';
		var myajax = new DedeAjax($o('_remotesta'),false,true,'-','-','...');
		myajax.SendGet2('index.php?step=11');
		DedeXHTTP = null;
	}
	
    function DoInstall()
    {
		var admin_name = $o('admin_name').value;
		var admin_pwd = $o('admin_pwd').value;
		var admin_pwd2 = $o('admin_pwd2').value;
		if(admin_name == ''){
		$o('mess_admin_name').innerHTML = '<font color="#ff3d00">×管理员用户名不能为空</font>';	
		return false;
		}
		if(admin_pwd == ''){
		$o('mess_admin_pwd').innerHTML = '<font color="#ff3d00">×管理员密码不能为空</font>';
		return false;	
		}
		if(admin_pwd != admin_pwd2){
		$o('mess_admin_pwd2').innerHTML = '<font color="#ff3d00">×管理员密码输入不一致</font>';
		return false;
		}
		document.getElementById('form_submit').disabled= true;
        document.form1.submit();
    }
-->
</script>
<link href="style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id='postloader' class='waitpage'></div>
<form action="index.php" method="post" name="form1">
<input type="hidden" name="step" value="4" />
<div class="top">
    <div class="top-logo">
        
    </div>
    <div class="top-link">
        <ul>
			<li><a href="http://www.damicms.com" target="_blank">官方网站</a></li>
			<li><a href="http://www.damicms.com/bbs" target="_blank">技术论坛</a></li></ul>
    </div>
    <div class="top-version">
        <!-- 版本信息 -->
        <h2>Mishop外贸版<?php echo $verMsg; ?></h2>
    </div>
</div>

<div class="main">
    <div class="pleft">
        <dl class="setpbox t1">
            <dt>安装步骤</dt>
            <dd>
                <ul>
                    <li class="succeed">许可协议</li>
                    <li class="succeed">环境检测</li>
                    <li class="now">参数配置</li>
                    <li>正在安装</li>
                    <li>安装完成</li>
                </ul>
            </dd>
        </dl>
    </div>
    <div class="pright">            
        <div class="pr-title"><h3>数据库设定</h3></div>
        <table width="726" border="0" align="center" cellpadding="0" cellspacing="0" class="twbox">
            <tr>
                <td class="onetd"><strong>数据库主机：</strong></td>
                <td><input name="dbhost" id="dbhost" type="text" value="localhost" class="input-txt" onChange="TestDb()" />
                <small>一般为localhost</small></td>
            </tr>
            <tr>
                <td class="onetd"><strong>Mysql端口：</strong></td>
                <td><input name="dbport" id="dbport" type="text" value="3306" class="input-txt"/>
                <small>一般为3306</small></td>
            </tr>
            <tr>
                <td class="onetd"><strong>数据库用户：</strong></td>
                <td><input name="dbuser" id="dbuser" type="text" value="root" class="input-txt" onChange="TestDb()"/><small>默认root</small></td>
            </tr>
            <tr>
                <td class="onetd"><strong>数据库密码：</strong></td>
                <td>
                  <div style='float:left;margin-right:3px;'><input name="dbpwd" id="dbpwd" type="text" class="input-txt" onChange="TestDb()" /></div>
                  <div style='float:left' id='dbpwdsta'></div>
                </td>
            </tr>
			<tr>
                <td class="onetd"><strong>数据库名称：</strong></td>
                <td>
                    <div style='float:left;margin-right:3px;'><input name="dbname" id="dbname" type="text" value="" class="input-txt" onChange="HaveDB()" /></div>
					<div style='float:left' id='havedbsta'></div>
                </td>
            </tr>
            <tr>
                <td class="onetd"><strong>数据库编码：</strong></td>
                <td>
                        <label for="dblang_latin1">UTF8</label>
                        
                </td>
            </tr>
        </table>
        <div class="pr-title"><h3>管理员设定</h3></div>
        <table width="726" border="0" align="center" cellpadding="0" cellspacing="0" class="twbox">
            <tr>
                <td class="onetd"><strong>管理员用户名：</strong></td>
                <td><input name="admin_name" id="admin_name" type="text" value="admin" class="input-txt" />
                <small id="mess_admin_name">默认admin,可修改</small></td>
            </tr>
            <tr>
                <td class="onetd"><strong>密码：</strong></td>
                <td><input name="admin_pwd" id="admin_pwd" type="password" value="" class="input-txt"/>
                <small id="mess_admin_pwd">必填</small></td>
            </tr>
            <tr>
                <td class="onetd"><strong>确认密码：</strong></td>
                <td><input name="admin_pwd2" id="admin_pwd2" type="password" value="" class="input-txt"/>
                <small id="mess_admin_pwd2">必填</small></td>
            </tr>
        </table>
        
        <div class="btn-box">
    <input type="button" class="btn-back" value="后退" onclick="window.location.href='index.php?step=2';" />
            <input type="button" class="btn-next" value="开始安装" onclick="DoInstall();" id="form_submit" />
      </div>
    </div>
</div>
<div class="foot">
</div>
</form>
</body>
</html>
